<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--#include file="DataLoad.asp"-->
<html>
<head>
<title><%=GuildName%> - DKP系统</title>
<script language="JavaScript" src="inc/jquery.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="Generator" content="EditPlus">
<meta name="Author" content="SULei">
<meta name="Keywords" content="魔兽世界DKP系统 DKP程序 公会DKP">
<meta name="Description" content="">
<link href="<%=StylePath%>/main.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" src="<%=StylePath%>/styleplus.js"></script>
<script language="JavaScript" src="inc/UBB_UI.js"></script>
<style type="text/css" media="all">

</style>
</head>

<body>
<div class="header">
<!--#include file="menu.asp"-->
</div>
<div class="main">
<div class="info">
<h3>公会动态 <%if CheckAdmin() then response.write "<a href='?action=add'>添加</a>"%></h3>
<%

sql="select * from article where article_class='news' order by id desc"
rs.open sql,conn,1,1
	if rs.eof or rs.bof then
	's
	else
		for ig = 1 to 8
			response.write "<div class='"&linec(ig)&"'>"
			response.write "<h4>"&rs("article_title")&CAbutton(rs("id"))&"</h4>"
			response.write "<p>"&UbbCode((rs("article_text")))&"</p>"
			response.write "</div>"
		rs.movenext
		if rs.eof then exit for
		next
	end if
rs.close
%>
</div>
				<ul class="temp_dev">
				<h3>CTRT使用图解</h3>
					<img src="http://www.sulei.net/blog/UploadFile/200633016562747213.jpg" border=0 alt="" />
				</ul>
      </div>
<div id="footer"><!--#include file="footer.asp"--></div>
</body>
</html>
<%
Sub Calendar()
	Dim tx
	Dim today,thisday,renew
	'Const Basedate="2006-1-17"
	Const Basedate="2005-1-17"
	today=now()
	for i = 0 to 6
		thisday=dateadd("d",i,today)
			if Weekday(thisday)=3 then 
				renew=renew& "<img src='images/raid/mc.gif' /><img src='images/raid/bwl.gif' /><img src='images/raid/aq40.gif' />"
			else
				renew=renew& "<img src='images/raid/none.gif' /><img src='images/raid/none.gif' /><img src='images/raid/none.gif' />"
			end if				
			if datediff("d",Basedate,thisday)/5=Cint(datediff("d",Basedate,thisday)/5) then 
				renew=renew& "<img src='images/raid/onx.gif' />"
			else
				renew=renew& "<img src='images/raid/none.gif' />"
			end if
			if datediff("d",Basedate,thisday)/3=Cint(datediff("d",Basedate,thisday)/3) then 
				renew=renew& "<img src='images/raid/zg.gif' /><img src='images/raid/aq20.gif' />"
			else
				renew=renew& "<img src='images/raid/none.gif' /><img src='images/raid/none.gif' />"
			end if
	
		tx=tx&"<li>"&day(thisday)&renew&"</li>"
		renew=""
	next
	Response.write "<div class='calendar'><ul><h3>今天是"&time_type(now(),"11")&" ,未来七天的副本更新:</h3>"&tx&"</ul></div>"
End Sub


sub newsAddForm()
	if request("action")="edit" then
		sql="select top 1 * from article where article_class='news' and id="&request("var")
		rs.open sql,conn,1,1
			response.write "<form name='put_log' method='post' action='?action=add2'><input type='text' name='article_title' size='60' value='"&rs("article_title")&"' /> <a href='javascript:hyperlink()'>链接</a> <a href='javascript:image()'>图片</a> <a href='javascript:bold()'>加粗</a><br>"
			response.write "<textarea name='article_text' rows='8' cols='80' name='l_content' id='l_content'>"&Server.HtmlEncode(rs("article_text"))&"</textarea>"
			response.write "<input type='hidden' name='article_date' value='"&rs("article_date")&"' /><input type='hidden' name='article_id' value='"&request("var")&"' /><input type='submit' value='编 辑' /></form>"
			
		rs.close
	elseif request("action")="add" then
		response.write "<form name='put_log' method='post' action='?action=add2'><input type='text' name='article_title' size='60' value='' /> <a href='javascript:hyperlink()'>链接</a> <a href='javascript:image()'>图片</a> <a href='javascript:bold()'>加粗</a><br>"
		response.write "<textarea name='article_text' rows='8' cols='80' name='l_content' id='l_content'></textarea>"
		response.write "<input type='hidden' name='article_id' value='' /><input type='submit' value='编 辑' /></form>"
	end if
End sub

'读取计划
function news(id) 
	if IsNumeric(id) and id<>"" then
	else
	news=""
	exit function
	end if
	rs.open sql,conn,1,1
		if not (rs.eof or rs.bof) then
		news=rs("article_text")
		end if
	rs.close
end function

Sub NewsAddSql()
dim aid
if request("article_id")<>"" and IsNumeric(request("article_id")) then 
aid=request("article_id")
else
aid=0
end if
	sql="select top 1 * from article where article_class='news' and id="&aid
	rs.open sql,conn,1,3
	if rs.eof or rs.bof then
		rs.addnew
		rs("article_class")="news"
		rs("article_title")=request("article_title")
		rs("article_text")=request("article_text")
		rs("article_date")=time_type(now(),3)
		rs("article_editor")=Session("UserCheck")
		rs.update
	else
		rs("article_class")="news"
		rs("article_title")=request("article_title")
		rs("article_text")=request("article_text")
		rs("article_date")=time_type(request("article_date"),3)
		rs("article_editor")=Session("UserCheck")
		rs.update		
	end if
	response.redirect "default.asp"
End Sub

sub NewsdelSql()
	if IsNumeric(request("var")) then
	conn.execute("Delete * from article where id="&request("var"))
	end if
end sub

Function CAbutton(id)
	if CheckAdmin() then
		CAbutton=" [<a href='default.asp?action=edit&amp;var="&id&"'>Edit</a>] [<a href='default.asp?action=del&amp;var="&id&"'>X</a>]"
	end if
end function
%>